#pragma once
#include <string>
namespace OpenSSL
{
    namespace Crypto
    {
      
#ifdef ENABLE_ENCRYPT
        std::string MD5(const std::string& data);
        namespace DES {

            enum class Mode{
                ECB         = 0,
                CFB         = 1,
                CBC         = 2
            };

            bool Encrypt(const std::string& key, const std::string& iv, const std::string& data, std::string& result, Mode mode);
            bool Decrypt(const std::string& key, const std::string& iv, const std::string& data, std::string& result, Mode mode);
        };

        namespace AES {
            enum class Mode {
                ECB = 0,
                CFB = 1,
                CBC = 2,
                CTR = 3
            };

            bool Encrypt(const std::string& key, const std::string& iv, const std::string& data, std::string& result, Mode mode);
            bool Decrypt(const std::string& key, const std::string& iv, const std::string& data, std::string& result, Mode mode);
        }

        namespace RSA{

            bool Encrypt(const std::string& keyN, const std::string& keyE, const std::string& data, std::string& result);
            bool Decrypt(const std::string& keyN, const std::string& keyE, const std::string& data, std::string& result);
        }

#endif
    }
}
